//
//  SDEvaluateCell.swift
//  SortProject
//
//  Created by ALH000355 on 2022/7/15.
//

import UIKit

class SDEvaluateCell: UITableViewCell {

    var logoIv: UIImageView!
    var titleLb: UILabel!

    var evaluateLb: UILabel!
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        
        uiConfig()
    }
    
    func uiConfig() {
        logoIv = UIImageView.init()
        logoIv.backgroundColor = .gray
        contentView.addSubview(logoIv)
        logoIv.snp.makeConstraints { make in
            make.left.top.equalTo(20)
            make.width.height.equalTo(40)
        }
        
        
        titleLb = UILabel.init()
        titleLb.text = "李明汽修专业"
        contentView.addSubview(titleLb)
        titleLb.font = .systemFont(ofSize: 16, weight: .medium)
        titleLb.snp.makeConstraints { make in
            make.left.equalTo(logoIv.snp.right).offset(10)
            make.top.equalTo(26)
            make.width.equalTo(180)
            make.height.equalTo(22)
        }
        
        evaluateLb = UILabel.init()
        evaluateLb.text = "主营：这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多这里的字超级多"
        contentView.addSubview(evaluateLb)
        evaluateLb.textColor = .gray
        evaluateLb.numberOfLines = 0
        evaluateLb.lineBreakMode = .byCharWrapping
        evaluateLb.font = .systemFont(ofSize: 12)
        evaluateLb.snp.makeConstraints { make in
            make.left.equalTo(titleLb.snp.left)
            make.right.equalTo(-10)
            make.top.equalTo(titleLb.snp.bottom).offset(20)
//            make.height.equalTo(10)
            make.bottom.equalTo(-10)
        }
    }

}
